package com.ruoyi.system.enums;

import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
public enum EventProcessEnums {
    ESCALATION("1", "上报"),
    ACCEPTANCE("2", "受理"),
    ALLOCATION("3", "分配"),
    HANDLE("4", "办理"),
    FEEDBACK("5", "反馈"),
    CLOSE("6", "结案");

    private final String code;
    private final String message;

    EventProcessEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static EventProcessEnums getInstance(String code) {
        switch (code) {
            case "1":
                return ESCALATION;
            case "2":
                return ACCEPTANCE;
            case "3":
                return ALLOCATION;
            case "4":
                return HANDLE;
            case "5":
                return FEEDBACK;
            case "6":
                return CLOSE;
            default:
                return null;
        }
    }
}
